package mockup;

/**
 * Contains information about an event.
 * @author Erik
 *
 */

public class AppointmentMockup extends Mockup implements Comparable<AppointmentMockup> {

	private ReservationMockup reservation;

	private String title;						//the title of this appointment
	private String description;					//the description of this appointment

	private String location;					//description of this appointment's location

	private int ownerID;

	/**
	 * Initializes the fields of the appointment.
	 * @param endTime The end time of the appointment
	 * @param description A description of the appointment
	 * @param location A description of the appointment location
	 * @param ownerId The user this appointment concerns
	 * @param reservation The reservation of the appointment
	 */
	public AppointmentMockup(int id, String title, String description, String location, 
			int ownerId, ReservationMockup reservation) {
		super(id);
		this.reservation = reservation;
		this.title = title;
		this.description = description;
		this.location = location;
		this.ownerID = ownerId;
	}

	/**
	 * Updates all the attributes and then fire a propertyChangeSupport (only once).
	 * Every change must go through this method.
	 * @param title The title to the appointment
	 * @param description The description to the appointment
	 * @param location The location to the appointment
	 * @param reservation The reservation to the appointment
	 */
	public void UpdateAll(String title, String description, String location, 
			ReservationMockup reservation) {

		setTitle(title);
		setDescription(description);
		setLocation(location);
		setReservation(reservation);
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public ReservationMockup getReservation() {
		return reservation;
	}

	public void setReservation(ReservationMockup reservation) {
		this.reservation = reservation;
	}

	public int getOwnerID() {
		return ownerID;
	}

	public void setOwnerID(int ownerID) {
		this.ownerID = ownerID;
	}

	@Override
	public int compareTo(AppointmentMockup a) {
		//TODO: This logic
		return 0;
	}
}
